﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PaginaLezenAndereGebruiker.aspx.cs" Inherits="Quaack.PaignaLezenAndereGebruiker" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p style="margin-bottom: 19px">
        <asp:Label ID="Label1" runat="server" Text="Pagina van gebruiker: "></asp:Label>
        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="messages" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" DataKeyNames="messid">
            <Columns>
                <asp:BoundField DataField="avatarlocation" HeaderText="avatarlocation" SortExpression="avatarlocation" />
                <asp:BoundField DataField="username" HeaderText="username" SortExpression="username" />
                <asp:BoundField DataField="message" HeaderText="message" SortExpression="message" />
                <asp:BoundField DataField="messdatetime" SortExpression="messdatetime" HeaderText="messdatetime">
                </asp:BoundField>


                <asp:BoundField DataField="sender" SortExpression="sender" HeaderText="pblocked" >
                 <ItemStyle CssClass="verberg" />
                 </asp:BoundField>
               
                 <asp:BoundField DataField="parentmessid" SortExpression="parentmessid" >
                  <ItemStyle CssClass="verberg" />
                 </asp:BoundField>

                  <asp:BoundField DataField="messid" SortExpression="messid" >
                  <ItemStyle CssClass="verberg" />
                 </asp:BoundField>

                <asp:CheckBoxField DataField="tempblocked" HeaderText="" SortExpression="tempblocked" />
                <asp:ButtonField CommandName= "Reageer" Text="Reageer" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="messages" runat="server" ConnectionString="<%$ ConnectionStrings:Quaack %>" SelectCommand=
            "SELECT profile.avatarlocation, profile.username, message.message, message.messdatetime, message.parentmessid, message.sender, profile_1.tempblocked, message.messid FROM message INNER JOIN profile ON message.sender = profile.profileid INNER JOIN profile AS profile_1 ON message.sender = profile_1.profileid WHERE (message.sender = @profileid) AND (message.removed = 0) OR (message.sender = profile.profileid) AND (message.removed = 0) AND (message.parentmessid = @profileid) ORDER BY message.messdatetime, message.parentmessid">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="0" Name="profileid" SessionField="reageerderID" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
